CC=g++
CFLAGS=-Wall 
BASEPATH = ~/thesis/cpp/piProc/src
exeName = demo
objMain = processorTest
obj1 = link
obj2 = linkslist
obj3 = linkcontrol
obj4 = processor
objects = $(objMain).o \
					$(BASEPATH)/comlink/$(obj1)/$(obj1).o \
					$(BASEPATH)/comlink/$(obj2)/$(obj2).o \
					$(BASEPATH)/comlink/$(obj3)/$(obj3).o \
					$(BASEPATH)/$(obj4)/$(obj4).o
					

$(exeName): $(objects)
	$(CC) -o $(exeName) $(objects)
$(objMain): $(objMain).cpp
	$(CC) -o $(objMain).cpp
$(obj1).o: $(BASEPATH)/comlink/$(obj1)/$(obj1).cpp
	$(CC) -o $(BASEPATH)/comlink/$(obj1)/$(obj1).cpp
$$(obj2).o: $(BASEPATH)/comlink/$(obj2)/$(obj2).cpp
	$(CC) -o $(BASEPATH)/comlink/$(obj2)/$(obj2).cpp
(obj3).o: $(BASEPATH)/comlink/$(obj3)/$(obj3).cpp
	$(CC) -o $(BASEPATH)/comlink/$(obj3)/$(obj3).cpp
(obj4).o: $(BASEPATH)/comlink/$(obj4)/$(obj4).cpp
	$(CC) -o $(BASEPATH)/comlink/$(obj4)/$(obj4).cpp

clean:
	rm -f $(exeName) $(objects)
